ActivityNodeReader.ChildActivities Property

Return list of children of this activity.

Parent Type: ActivityNodeReader

Namespace: Microsoft.LearningComponents.Manifest

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public ReadOnlyCollection<ActivityNodeReader> ChildActivities

{ get; }
Exceptions
Exception type Condition
InvalidPackageException

ManifestReaderSettings.FixScormRequirementViolations=false is set and there are child activities and resources on this node.

Remarks

If this is a SCORM 2004 package and there are child activities and a resource for this activity, this property will throw an InvalidPackageException if ManifestReaderSettings.FixScormRequirementViolations=false is set, or issue a warning to the log if ManifestReaderSettings.FixScormRequirementViolations=true is set.

Although SCORM mandates that no two item nodes may have the same identifier in a manifest, there is not check for that when building this collection. It is up to the application to handle if multiple items have identical identifier attributes.

Example

Given an ActivityNodeReader, iterate through all child activities.

C#
            foreach (ActivityNodeReader child in activity.ChildActivities)
            {
                // use the ActivityNodeReader
            }